/**
 * Created with IntelliJ IDEA.
 * Description: 输出 1000 - 2000 之间所有的闰年
 * User: 15085202591
 * Date: 2022-10-31
 * Time: 10:10
 */

public class PrintLeap {
    public static void main(String[] args) {
        System.out.println("1000到2000之间所有闰年为：");
        int k=0;
        for (int i = 1000; i < 2000; i++) {
            if(i % 400 == 0 || i % 100 != 0 && i % 4 == 0){
                System.out.print(i + " ");
                k++;
                if(k % 10 == 0) {
                    System.out.println();
                }
            }
        }
    }
}
